package com.geqian.web.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import lombok.Data;
import java.util.Date;
import java.sql.Time;

/**
* ${description}
* @author ${author}
* @date ${date}
*/
@Data
@TableName(value ="${tableName}")
public class ${className} implements Serializable {

<#if dataList??>
    <#list dataList as data>
        <#if data.autoIncrement>
    /**
    *  ${data.columnComment}
    */
    @TableId(type = IdType.AUTO)
    private ${data.fieldType} ${data.fieldName};

        <#elseif data.primaryKey>
    /**
    *  ${data.columnComment}
    */
    @TableId(type = IdType.INPUT)
    private ${data.fieldType} ${data.fieldName};

        <#else>
    /**
    *  ${data.columnComment}
    */
    <#if data.fieldType == 'Date'>
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    private ${data.fieldType} ${data.fieldName};

        </#if>
    </#list>
</#if>
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}